<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta content="telephone=no" name="format-detection" />
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta name="apple-mobile-web-app-status-bar-style" content="black" />
	<meta name="viewport" content="width=320, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
	<link rel="apple-touch-icon-precomposed" href="images/apple-touch-icon.png"/>
	<title>嘛嘛公寓</title>
	<meta name="keywords" content="嘛嘛公寓" />
	<meta name="description" content="嘛嘛公寓" />
	<link href="__PUBLIC__/h-ui/wap/css/reset.css" rel="stylesheet" type="text/css" />
	<link href="__PUBLIC__/h-ui/wap/css/head.css" rel="stylesheet" type="text/css" />
	<link href='__PUBLIC__/h-ui/wap/css/user.css' rel='stylesheet' type='text/css' />
	<script type="text/javascript" src="__PUBLIC__/h-ui/wap/js/jquery-1.8.3.min.js"></script>
	<link rel="stylesheet" href="__PUBLIC__/h-ui/lib/layui/layui/css/layui.css">
	<script type="text/javascript" src="__PUBLIC__/h-ui/lib/layer/2.4/layer.js"></script>
</head>
<body> 
<div class="header" id="header">
	<span class="headline">登录</span>
</div>
<section class="login">
	<div class="form">
		<form method="post" action="" onsubmit="return false;">
			<ul>
				<li class="sign clearfix" style="padding-top: 50px;"></li>
				<li class="user-info name">
					<input class='tipInput' placeholder='用户名/手机号' type="text" name="user_name" id='user_name' value="15823214287" />	
				</li>
				<li class="user-info pwd">
					<input class='password' tar='password' type="text" placeholder="查询码" value="582217" name="code" id="code" />
					<input type='hidden' name='back' value="" >		
				</li>
				<li class="enter">
					<input id='btn_enter' type="submit" class="btn" value="" />
				</li>
				<li class="clearfix" style="display: none;">
					<span class="auto"><input type="checkbox"  id="remerber" checked class="check" />自动登录</span>
					<a class="getpwd" href='#'>忘记密码</a>
				</li>
			</ul>
			<input type="hidden" name="act" value="login" />
		</form>	
	</div>
</section>
<script type="text/javascript">
	$(document).ready(function(){
		$("#btn_enter").on('click', function(){
			var data = {};
			var phone = $("#user_name").val();
			var code = $("#code").val();
			if(phone.length <= 0){
				layer.msg('请输入用户名/手机号', {icon: 5, time: 2000});
				return false;
			}

			if(code.length <= 0){
				layer.msg('请输入查询码', {icon: 5, time: 2000});
				return false;
			}

			data.phone = phone;
			data.code = code;

			$.post('login.html', data, function(result){
				if(result.errCode/1){
					location.href = 'cost.html?roomnumber='+ result.roomnumber + '&mid='+ result.member_id;
				}else{
					layer.msg(result.message, {icon: 2, time: 2000});
				}
			},"JSON");
		});
	});
</script>
</body>
</html>

